package com.neuedu.corejava.ch4.practise;

import java.util.Random;

public class Demo15 {

	public static void main(String[] args) {
		// 编写一个长度为5的整型数组，每个元素赋值为0-10的随机整数，遍历该数组，输出每个元素。
        // arr[i] = new Random().nextInt(11);
		Random ran = new Random();
		int arr[] = new int[5];

		for (int i = 0; i < arr.length; i++) {
			arr[i] = ran.nextInt(11);
			System.out.println(arr[i]);

		}
	}

}
